<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page
	import="com.bisoubeaute.cake.model.order.OrderModel,com.bisoubeaute.cake.model.order.OrderDetailsModel"
	language="java"%>
<%
    String basePath = request.getContextPath();
%>	
<!DOCTYPE html>
<html>
	<head>		
		<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
		<link rel="icon" href="http://wechat.monmondecake.com/monmomde/cakewap/images/favicon.ico" type="image/x-ico"/>
		<meta charset="UTF-8">
		<style type="text/css">
			*{padding:0px;margin:0px;color: #6F6F6F;}
			header{width: 100%;height: 62px;text-align: center;line-height: 62px;font-weight: bold;}
			header span{background: url(http://image.monmondecake.com/logo.png) no-repeat;background-size: 20%;width: 30%;height: 102px;position: absolute;left: 5%;top:5px;}
			.black{color: #000000;font-weight: bold;}
			.mt18{margin-top:18px}
			.fr{float: right;}
			table{width: 90%;margin: 0 5%;border-top: 1px solid #000;border-left: 1px solid #000;border-collapse: collapse;table-layout: fixed;word-break: break-all;word-wrap: break-word;}
		    tr{display: table-row;vertical-align: inherit;border-color: inherit;height: 20px;line-height:20px ;}
		    table td,table th{padding: 1.5mm;border-bottom: 1px solid #000;border-right: 1px solid #000;text-align: left;empty-cells: show;word-break: break-all;}
		    table td{color: #000000;font-weight: bold;}
		    p{width: 90%;margin: 0 5%;margin-top: 5px;line-height: 35px;}
		    p b{color: red;}
		   .noprint{
                margin:10px;margin-top:15px;padding:10px;background:#F5F6F7;border:1px solid #BDBDBD;padding:8px;
             }
           .noprint input{
                padding:4px;border:1px solid #3F74D0;
             }
		</style>
		<style type="text/css" media="print">
           .noprint {
	        display: none;
            }
         </style>
	</head>
	<body>		
		<header><span></span>Mon MondeCake 订单明细</header>
		<section>
			<table>
				<tr>
					<th>订单ID:<span class="black">${orderModel.id}</span></th>
					<th>订单编号:<span class="black">${orderModel.orderCode}</span></th>
					<th>用户ID:<span class="black">${orderModel.userId}</span></th>
				</tr>
				<tr>
					<th>用户姓名:<span class="black">${orderModel.userName}</span></th>
					<th>订单金额:<span class="black"><fmt:formatNumber value="${orderModel.totalAmount}" pattern="#,##0.00#"/></span></th>
					<th>支付金额:<span class="black"><fmt:formatNumber value="${orderModel.payAmount}" pattern="#,##0.00#"/></span></th>
				</tr>
				<tr>
					<th>配送日期:<span class="black"><fmt:formatDate value="${orderModel.deliveryDate}" pattern="yyyy年MM月dd日 "/></span></th>
					<th>配送时间段:<span class="black">${orderModel.deliveryTimes}</span></th>
					<th>生日牌:<span class="black">${orderModel.birthdayTitle}</span></th>
				</tr>
			</table>
			<table class="mt18">
				<tr><th>收货人:<span class="black">${orderModel.consignee}</span></th></tr>
				<tr><th>收货人电话:<span class="black">${orderModel.consignPhone}</span></th></tr>
				<tr><th>收货人地址:<span class="black">${orderModel.consignAddress}</span></th></tr>
				<tr><th>生日卡片:<span class="black">${orderModel.birthdayCard}</span></th></tr>
				<tr><th>备注:<span class="black">${orderModel.remark}</span></th></tr>
			</table>
	<c:if test="${!empty orderList}">		
			<table class="mt18">
				<tr>
					<th>商品名称</th>
					<th>商品尺寸</th>
					<th>商品重量</th>
					<th>商品单价</th>
					<th>商品数量</th>
					<th>商品类型</th>
					<th>小计</th>
				</tr>
			<c:forEach items = "${orderList}" var = "order" >
				<tr>
					<td><c:if test="${!empty order.goodsName}">${order.goodsName}</c:if></td>
				    <td><c:if test="${!empty order.goodsSize}">${order.goodsSize}</c:if></td>
				    <td><c:if test="${!empty order.goodsWeight}">${order.goodsWeight}</c:if></td>
				    <td><fmt:formatNumber value="${order.goodsPrice}" pattern="#,##0.00#"/></td>
				    <td><c:if test="${!empty order.goodsNumber}">${order.goodsNumber}</c:if></td>
				    <td>
					    <c:if test="${order.goodsType==0}">
						       商品
					    </c:if>
					    <c:if test="${order.goodsType==1}">
						        配件
					    </c:if>
				</td>
				<td><fmt:formatNumber value="${order.subTotal}" pattern="#,##0.00#"/></td>
				</tr>
	       </c:forEach>			
			</table>
		</section>
		<p>注：<b>XXXXXXXXXXXX</b></p>
		<p>负责人（签字）：</p>
		<p>日期：</p>
		<div class="noprint">
		   <input type=button value="打 印" class='input_an2' 
			onclick="window.print();" /> <input type=button value="关 闭"
			class='input_an2'  onclick="window.close();" />
		</div>
		
	  </c:if>  
	</body>
</html>